home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / WWW / Library / Implementation / HTAlert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-28  |  3.2 KB  |  122 lines

  1. /*                                                  HTAlert: Handling user messages in libwww
  2.                   DISPLAYING MESSAGES AND GETTING INPUT FOR WWW LIBRARY
  3.                                              
  4.    This module may be overridden for GUI clients.    It allows progress indications and
  5.    warning messages to be communicated to the user in a portable way.  It should be used
  6.    for this purpose throughout the library but isn't yet (July 93)
  7.    
  8.       May 92 Created By C.T. Barker
  9.       
  10.       Feb 93 Portablized etc TBL
  11.       
  12.  */
  13. #ifndef HTUTILS_H
  14. #include "HTUtils.h"
  15. #endif /* HTUTILS_H */
  16. #include "tcp.h"
  17.  
  18. #ifdef SHORT_NAMES
  19. #define HTPrPass        HTPromptPassword
  20. #define HTPUnAPw        HTPromptUsernameAndPassword
  21. #endif /*SHORT_NAMES*/
  22.  
  23. /*
  24.  
  25. HTPrompt and HTPromptPassword: Display a message and get the input
  26.  
  27.    HTPromptPassword() doesn't echo reply on the screen.
  28.    
  29.   ON ENTRY,
  30.   
  31.   Msg                     String to be displayed.
  32.                          
  33.   deflt                   If NULL the default value (only for HTPrompt())
  34.                          
  35.   ON EXIT,
  36.   
  37.   Return value            is malloc'd string which must be freed.
  38.                          
  39.  */
  40.                 
  41. extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
  42. extern char * HTPromptPassword PARAMS((CONST char * Msg));
  43.  
  44. /*
  45.  
  46. HTPromptUsernameAndPassword: Get both username and password
  47.  
  48.   ON ENTRY,
  49.   
  50.   Msg                    String to be displayed.
  51.                          
  52.   username                Pointer to char pointer, i.e. *usernamepoints to a string.  If
  53.                          non-NULL it is taken to be a default value.
  54.                          
  55.   password                Pointer to char pointer, i.e. *passwordpoints to a string.
  56.                          Initial value discarded.
  57.                          
  58.   ON EXIT,
  59.   
  60.   *username               and
  61.                          
  62.   *password               point to newly allocated strings representing the typed-in
  63.                          username and password.  Initial strings pointed to by them are
  64.                          NOT freed!
  65.                          
  66.  */
  67.  
  68. extern void HTPromptUsernameAndPassword PARAMS((CONST char *    Msg,
  69.                                                 char **         username,
  70.                                                 char **         password));
  71.  
  72. /*
  73.  
  74. Display a message, don't wait for input
  75.  
  76.   ON ENTRY,
  77.   
  78.   Msg                     String to be displayed.
  79.                          
  80.  */
  81.  
  82. extern void HTAlert PARAMS((CONST char * Msg));
  83.  
  84.  
  85. /*
  86.  
  87. Display a progress message for information (and diagnostics) only
  88.  
  89.   ON ENTRY,
  90.   
  91.    The input is a list of parameters for printf.
  92.    
  93.  */
  94. extern void HTProgress PARAMS((CONST char * Msg));
  95. extern BOOLEAN mustshow;
  96. #define _HTProgress(msg)    mustshow = TRUE, HTProgress(msg)
  97.  
  98. /*
  99.  
  100. Display a message, then wait for 'yes' or 'no'.
  101.  
  102.   ON ENTRY,
  103.   
  104.   Msg                     String to be displayed
  105.                          
  106.   ON EXIT,
  107.   
  108.   Returns                 If the user reacts in the affirmative, returns TRUE, returns
  109.                          FALSE otherwise.
  110.                          
  111.  */
  112.  
  113. extern BOOL HTConfirm PARAMS ((CONST char * Msg));
  114.  
  115.  
  116.  
  117.  
  118.  
  119. /*
  120.  
  121.     */
  122.